package com.lxlg.lxlg_order.client;

import com.lxlg.core.utils.Result;
import com.lxlg.lxlg_order.client.param.GoodsRefundForm;
import com.lxlg.lxlg_order.client.param.RefundMoneyForm;
import com.lxlg.lxlg_order.client.result.GoodsRefundInfo;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.validation.Valid;

@FeignClient(contextId = "goodsRefundClient",name="orderservice")
@RequestMapping("/orderservice/infra/goods-refund")
public interface GoodsRefundClient {


    @PostMapping("requestReturn")
    @ApiOperation("发起退款")
    public Result<GoodsRefundInfo> requestReturn(@RequestBody @Valid GoodsRefundForm goodsRefundForm);



    @PostMapping("refundmoney")
    @ApiOperation("退款")
    public Result<?> refundmoney(@Valid @RequestBody RefundMoneyForm refundMoneyForm) ;

//    /**
//     * 商品退款
//     */
//    @PostMapping("goodsRefund")
//    public Result<>

}
